<tr>
    <td>
        <a href="{{ service.get_absolute_url }}">{{ service.name }}</a>
    </td>
    <td>
        {{ service.get_protocol_display }}/{{ service.port }}
    </td>
    <td>
        {% for ip in service.ipaddresses.all %}
            <span>{{ ip.address.ip }}</span><br />
        {% empty %}
            <span class="text-muted">All IPs</span>
        {% endfor %}
    </td>
    <td>{{ service.description }}</td>
    <td class="text-right noprint">
        <a href="{% url 'ipam:service_changelog' pk=service.pk %}" class="btn btn-default btn-xs" title="Change log">
            <i class="fa fa-history"></i>
        </a>
        {% if perms.ipam.change_service %}
            <a href="{% url 'ipam:service_edit' pk=service.pk %}" class="btn btn-info btn-xs" title="Edit service">
                <i class="glyphicon glyphicon-pencil"></i>
            </a>
        {% endif %}
        {% if perms.ipam.delete_service %}
            <a href="{% url 'ipam:service_delete' pk=service.pk %}?return_url={{ service.parent.get_absolute_url }}" class="btn btn-danger btn-xs">
                <i class="glyphicon glyphicon-trash" title="Delete service"></i>
            </a>
        {% endif %}
    </td>
</tr>
